package com.peas.platform.module.icims.budget.project.adapter.repository.po;

import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 一级项目申报
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_budget_project_one`")
public class BudgetProjectOnePo extends BasePo {

    // 项目分类ID
    // （项目分类表）外键
    @Comment(value = "项目分类ID")
    @TableField(value = "`catalog_id`", jdbcType = JdbcType.BIGINT)
    private Long catalogId;

    // 编报部门ID
    // （组织架构表）外键
    @Comment(value = "编报部门ID")
    @TableField(value = "`department_id`", jdbcType = JdbcType.BIGINT)
    private Long departmentId;

    // 一级项目编号
    @Comment(value = "一级项目编号")
    @Size(max = 50, message = "一级项目编号不能超过50个字符")
    @TableField(value = "`code`", jdbcType = JdbcType.VARCHAR)
    private String code;

    // 一级项目名称
    @Comment(value = "一级项目名称")
    @Size(max = 100, message = "一级项目名称不能超过100个字符")
    @TableField(value = "`name`", jdbcType = JdbcType.VARCHAR)
    private String name;

    // 上级一级项目ID
    // （一级项目表）外键
    @Comment(value = "上级一级项目ID")
    @TableField(value = "`parent_id`", jdbcType = JdbcType.BIGINT)
    private Long parentId;

    // 资金主管科室
    @Comment(value = "资金主管科室")
    @TableField(value = "`manager_org_id`", jdbcType = JdbcType.BIGINT)
    private Long managerOrgId;

    // 存续状态
    @Comment(value = "存续状态")
    @Size(max = 20, message = "存续状态不能超过20个字符")
    @TableField(value = "`viability`", jdbcType = JdbcType.VARCHAR)
    private String viability;

    // 预算级次
    @Comment(value = "预算级次")
    @Size(max = 20, message = "预算级次不能超过20个字符")
    @TableField(value = "`level`", jdbcType = JdbcType.VARCHAR)
    private String level;

    // 项目负责人用户ID
    // （用户表）外键
    @Comment(value = "项目负责人用户ID")
    @TableField(value = "`principal_user_id`", jdbcType = JdbcType.BIGINT)
    private Long principalUserId;

    // 金额
    @Comment(value = "金额")
    @TableField(value = "`amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal amount;

    // 本年度申报金额
    @Comment(value = "本年度申报金额")
    @TableField(value = "`current_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal currentAmount;

    // 项目库状态
    @Comment(value = "项目库状态")
    @Size(max = 20, message = "项目库状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 计划开始年度
    @Comment(value = "计划开始年度")
    @Size(max = 4, message = "计划开始年度不能超过4个字符")
    @TableField(value = "`plan_start`", jdbcType = JdbcType.VARCHAR)
    private String planStart;

    // 计划截止年度
    @Comment(value = "计划截止年度")
    @Size(max = 4, message = "计划截止年度不能超过4个字符")
    @TableField(value = "`plan_end`", jdbcType = JdbcType.VARCHAR)
    private String planEnd;

    // 附件ID
    // （附件表）外键
    @Comment(value = "附件ID")
    @TableField(value = "`attachment_id`", jdbcType = JdbcType.BIGINT)
    private Long attachmentId;

}
